home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
shazam.exe
/
INPUT2.DEF
< prev
next >
Wrap
Text File
|
1992-09-01
|
2KB
|
68 lines
.Evolving an Application: Data Entry Dialog, encapsulated w/Edit mode
COMMENTS
--------
Okay, we've managed to accomplish a number of things:
(1) We've created a dialog object which handles all record events
internally; it's "encapsulated".
(2) We've added an "Edit mode", which:
(a) Beeps on keyboard input, unless the user activates "Edit".
(b) Turns on "StaticText", which tells use how to move from field
to field.
(c) Sets the screen's border color (color systems only).
(3) Hints are now "off" when not editing.
The "GetHelpCtx" method for the object will return "hcNoContext"
when NOT in "Edit" mode. This will turn off hints, since the
StatusLine is context sensitive.
NOTE - Now, there is no new "Application^.HandleEvent", since all
events (so far) in this application are encapsulated.
UPSIDE
------
The user can't accidentally over-write data; they've gotta
deliberately activate "Edit" mode by pressing "F2". They can still
browse the database, whether in "Edit" or "View" mode.
DOWNSIDE
--------
Gosh, darn it - we forgot a ScrollBar! What kind of Application are
you writing here, anyhow? And the user did WHAT! Closed the dialog
while in Edit mode? Sigh...ok, let's see what we can do next.
@PA - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ UNIT ]
General /R @@ Use & Register
[ DIALOG ]
input
[ DEFINE ]
PrevRecord,NextRecord,First,Last,Edit @@ SHAZAM creates & numbers'em
[ INTERNAL ]
PrevRecord,NextRecord,First,Last,Edit @@ Don't put in ^.HandleEvent,
@@ since new "TForm" does it.
[ SUBMENU ] Record ;;move around
Edit F2 ;;Edit/View mode
[ NEWLINE ]
next PgDn cmNextRecord ;;next record
prior PgUp cmPrevRecord ;;prior record
first Ctrl-PgUp ;;show the first record
last Ctrl-PgDn ;;show the last record
[ HINT ]
hcName ;;who is this?
hcAddress ;;where do they live?
hcPhone ;;how do I contact them?
hcMemo ;;why I am typing in their name?